package com.yunhai.support.controller;

import com.yunhai.common.dto.Ret;
import com.yunhai.support.utils.QuartzToken;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/quartz")
public class QuartzTokenController {

    @GetMapping("/submit")
    public Ret submitQuartz(String cookie ) throws Exception {
        if( cookie == null ){
            return Ret.fail("cookie值不存在");
        }
        QuartzToken.TOKEN = cookie;
        return Ret.ok();
    }
}
